package cn.aran.org.domain;

import cn.aran.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
* @Description: Department部门类
* @Author: Aran
* @Version: 1.0
* @Date:  2022/6/21 18:37
*/
@Data
public class Department extends BaseDomain {

    private String name;
    private Long managerId;
    private String sn;
    private Long parentId;
    // 1启用,0禁用
    private Integer state;
    private String dirPath;

    // 部门负责人
    private Employee manager;

    // 上级部门
    private Department parent;

    // 子部门
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 当数据不为空的时候才返回
    private List<Department> children = new ArrayList<>();

}
